#import "UmbrellaMergeController.h"
        
#import "UmbrellaMergeModel.h"
#import "UmbrellaMergeCell.h"
#import "Masonry.h"

@interface UmbrellaMergeController () <UITableViewDataSource, UITableViewDelegate>

@property (nonatomic, strong) UITableView *wonderStillnessDreamscapeTableView;
@property (nonatomic, strong) NSMutableArray *arcaneArray;

@end

@implementation UmbrellaMergeController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self unveilInitview];
	[self harbingerMinglegetData];
}


//: 获取数据模型
- (void)harbingerMinglegetData {
	
}

//: 懒加载数据模型数组
- (NSMutableArray *)arcaneArray {
	if (!_arcaneArray) {
		_arcaneArray = [NSMutableArray array];
	}
	return _arcaneArray;
}

- (UITableView *)figHandleTableView {
    if (!_wonderStillnessDreamscapeTableView) {
        _wonderStillnessDreamscapeTableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
        _wonderStillnessDreamscapeTableView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
        _wonderStillnessDreamscapeTableView.estimatedRowHeight = 0;
        _wonderStillnessDreamscapeTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
        _wonderStillnessDreamscapeTableView.contentInset = UIEdgeInsetsMake(16, 0, 16, 0);
        _wonderStillnessDreamscapeTableView.delegate = self;
        _wonderStillnessDreamscapeTableView.dataSource = self;
        _wonderStillnessDreamscapeTableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
        _wonderStillnessDreamscapeTableView.showsVerticalScrollIndicator = NO;
        _wonderStillnessDreamscapeTableView.showsHorizontalScrollIndicator = NO;
        _wonderStillnessDreamscapeTableView.backgroundColor = UIColor.clearColor;
    }
    return _wonderStillnessDreamscapeTableView;
}

//: 初始化页面UI
- (void)unveilInitview {

	[self.view addSubview:self.wonderStillnessDreamscapeTableView];
	[self.wonderStillnessDreamscapeTableView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.leading.trailing.equalTo(self.view);
		make.top.equalTo(self.view);
		make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom);
	}];
}


#pragma mark - UITableView DataSource 
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.arcaneArray.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    UmbrellaMergeCell *radiateKineticSuspicion = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([UmbrellaMergeCell class])];
    if (radiateKineticSuspicion == nil) {
        radiateKineticSuspicion = [[UmbrellaMergeCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:NSStringFromClass([UmbrellaMergeCell class])];
    }
    radiateKineticSuspicion.selectionStyle = UITableViewCellSelectionStyleNone;
    
    return radiateKineticSuspicion;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
	UmbrellaMergeModel *butterflyQuiverCharisma = self.arcaneArray[indexPath.row];
	return butterflyQuiverCharisma.zebraNebulaDreamCellHeight;
}


#pragma mark - UITableView Delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    // cell tap action
}


@end
